/*
 * InputEventMgr.h
 *
 *  Created on: 2021年9月6日
 *      Author: vicent-PC
 */

#ifndef MAIN_HAL_INPUTEVENTMGR_H_
#define MAIN_HAL_INPUTEVENTMGR_H_

#include "Activity.h"

class InputEventMgr {
   public:
    InputEventMgr();
    static InputEventMgr* getInstance() {
        if (m_pInstance == nullptr) m_pInstance = new InputEventMgr();
        return m_pInstance;
    }

    virtual ~InputEventMgr();
    void init();
    void registerMgr();
    void registerReciever(Activity* activity);
    void deInit();
    void dispatch(int key);

   public:
    static InputEventMgr* m_pInstance;

   private:
    Activity* mReciever;
};

#endif /* MAIN_HAL_INPUTEVENTMGR_H_ */
